home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tvg103_s.zip / TVGRAPH.DOC < prev    next >
Text File  |  1992-07-29  |  2KB  |  55 lines

  1.                               TVGRAPH 1.03
  2.                               TURBO VISION
  3.                   using TURBO VISION In EGA/VGA graphics
  4.                            (C) Mindware 1991
  5.                          Brisbane,QLD,Australia
  6.                            Fido : 3:640/305.1
  7.  
  8. 0. See Modified TVDEMO program and STYX.PAS to show you how to do things
  9.  
  10. 1. All that is required is to include TVGRAPH in the uses statement in your
  11. main program and amazing - TVGRAPH will work in graphics mode.
  12.  
  13. 2. Declarations are as follows
  14.  
  15. type
  16.  PGRect=^GRect;
  17.  GRect=Trect;
  18.  
  19.  PGPoint=^GPoint;
  20.  GPoint=TPoint;    (* These two just to avoid confusion *)
  21.  
  22. 3. Graphics IDs
  23. All "text" windows are given a graphics ID of 0, each window you want
  24. to use graphics in - you need to assign a graphics ID to it, if a line is
  25. drawn using the internal RawDrawLine - then if the current graphics window
  26. is the same as the location you are writing to on the screen then the graphics
  27. will overwrite - else the graphics will be clipped.
  28.  
  29. function NextGraphId:byte; (* Get next available graphics id *)
  30. procedure UseGraphId(b:byte); (* Use graphics ID for following graphics *)
  31. procedure ReleaseGraphId(b:byte); (* release graphics ID for use *)
  32.  
  33. To assign a graphics id to a character cell ensure you write character n with
  34. attribute 0FFh into the location using standard TURBO VISION methods.
  35.  
  36.  
  37. 4. Other routines
  38. procedure TextToGraphics(T:TRect;var G:Grect);
  39. (*converts a Text rectangle T into a Grect based on current screen locations *)
  40.  
  41. procedure RawDrawLine(X1,Y1,X2,Y2:integer;Color:word);
  42. (* draw line from using screen co-ordinates *)
  43.  
  44. procedure DrawLine(X1,Y1,X2,Y2:integer;Color:word);
  45. (* draw line using global co-ordinates i.e. *)
  46. (* X is 0..GraphXMax (10000) *)
  47. (* Y is 0..GraphYMax=(07500) *)
  48.  
  49. function ISin(X:integer):integer;
  50. function ICos(X:integer):integer;
  51. (* Integer trig functions  - X is number of 16ths of a degree *)
  52. (* returns number -1024..1024 representing -1.000..+1.000 *)
  53.  
  54.  
  55.